<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        .a {
            width: 300px;
            height: 100px;
            background-color: #f00;

            /* 相对于父元素的宽度而言的 */
            padding-top: 2%;
        }


        .b {
            width: 0;
            height: 0;
            padding: 10%;
            background-color: #000;
        }

        p {
            font-size: .24rem;
        }

        p span {
            font-size: .4rem;
            display: inline-block;
            /* 行内元素不支持transform属性 */
            transform: scale(0.5);
            transform-origin: 0 center;
        }
    </style>
</head>

<body>

    <!-- 
        box-sizing:border-box

        边框  1px  

        百分比布局  1rem  flex-grow:1       10%   80%

     -->

    <div class="a"></div>

    <div class="b"></div>

    <p>呵呵呵呵 <span>呵呵呵呵</span></p>

</body>

</html>